/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlEditRegCustomer.java
 *
 * Created on 18 ม.ค. 2553, 15:48:44
 */

package store.frontend;

/**
 *
 * @author Administrator
 */
public class PnlEditSellProduct extends javax.swing.JPanel {

    /** Creates new form PnlEditRegCustomer */
    public PnlEditSellProduct() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlEditSellProduct = new javax.swing.JPanel();
        lblEditSellProduct = new javax.swing.JLabel();
        btnSellProductSave = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblEditSellProduct = new javax.swing.JTable();
        lblEditSellProductIDStaff = new javax.swing.JLabel();
        lblEditSellProductIDCustomer = new javax.swing.JLabel();
        lblEditSellProductIDProduct = new javax.swing.JLabel();
        txfEditSellProductIDStaff = new javax.swing.JTextField();
        txfEditSellProductIDCustomer = new javax.swing.JTextField();
        txfEditSellProductIDProduct = new javax.swing.JTextField();
        btnEditSellProductOK = new javax.swing.JButton();
        lblListTotal1 = new javax.swing.JLabel();
        lblListTotal = new javax.swing.JLabel();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlEditSellProduct.setBackground(new java.awt.Color(255, 204, 102));
        pnlEditSellProduct.setMaximumSize(new java.awt.Dimension(700, 80));
        pnlEditSellProduct.setPreferredSize(new java.awt.Dimension(700, 80));

        lblEditSellProduct.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblEditSellProduct.setText("แก้ไขรายการขายสินค้า");

        btnSellProductSave.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnSellProductSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/save_30x30.gif"))); // NOI18N
        btnSellProductSave.setPreferredSize(new java.awt.Dimension(40, 40));

        jButton3.setFont(new java.awt.Font("Tahoma", 0, 14));
        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/cancel_30x30.gif"))); // NOI18N
        jButton3.setPreferredSize(new java.awt.Dimension(40, 40));

        javax.swing.GroupLayout pnlEditSellProductLayout = new javax.swing.GroupLayout(pnlEditSellProduct);
        pnlEditSellProduct.setLayout(pnlEditSellProductLayout);
        pnlEditSellProductLayout.setHorizontalGroup(
            pnlEditSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditSellProductLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlEditSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlEditSellProductLayout.createSequentialGroup()
                        .addComponent(btnSellProductSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblEditSellProduct))
                .addContainerGap(512, Short.MAX_VALUE))
        );
        pnlEditSellProductLayout.setVerticalGroup(
            pnlEditSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlEditSellProductLayout.createSequentialGroup()
                .addGap(441, 441, 441)
                .addComponent(lblEditSellProduct)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlEditSellProductLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSellProductSave, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        add(pnlEditSellProduct, java.awt.BorderLayout.NORTH);

        jPanel2.setPreferredSize(new java.awt.Dimension(700, 300));

        tblEditSellProduct.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblEditSellProduct.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "รหัสสินค้า", "ชนิดสินค้า", "ราคา(ต่อหน่วย)", "ราคารวม", "หมายเหตุ"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblEditSellProduct);

        lblEditSellProductIDStaff.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEditSellProductIDStaff.setText("รหัสพนักงาน :");

        lblEditSellProductIDCustomer.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEditSellProductIDCustomer.setText("รหัสลูกค้า :");

        lblEditSellProductIDProduct.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEditSellProductIDProduct.setText("รหัสสินค้า :");

        txfEditSellProductIDStaff.setFont(new java.awt.Font("Tahoma", 0, 12));
        txfEditSellProductIDStaff.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfEditSellProductIDStaffActionPerformed(evt);
            }
        });

        txfEditSellProductIDCustomer.setFont(new java.awt.Font("Tahoma", 0, 12));
        txfEditSellProductIDCustomer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfEditSellProductIDCustomerActionPerformed(evt);
            }
        });

        txfEditSellProductIDProduct.setFont(new java.awt.Font("Tahoma", 0, 12));
        txfEditSellProductIDProduct.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfEditSellProductIDProductActionPerformed(evt);
            }
        });

        btnEditSellProductOK.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnEditSellProductOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/ok_30x30.gif"))); // NOI18N
        btnEditSellProductOK.setMaximumSize(new java.awt.Dimension(71, 25));
        btnEditSellProductOK.setMinimumSize(new java.awt.Dimension(71, 25));
        btnEditSellProductOK.setPreferredSize(new java.awt.Dimension(40, 40));

        lblListTotal1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        lblListTotal1.setText("ยอดสุทธิ");

        lblListTotal.setFont(new java.awt.Font("Tahoma", 1, 48)); // NOI18N
        lblListTotal.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        lblListTotal.setText("0.0");
        lblListTotal.setToolTipText("ยอดรวม");
        lblListTotal.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        lblListTotal.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lblListTotal.setMaximumSize(new java.awt.Dimension(180, 180));
        lblListTotal.setMinimumSize(new java.awt.Dimension(180, 180));
        lblListTotal.setPreferredSize(new java.awt.Dimension(180, 180));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblEditSellProductIDStaff)
                    .addComponent(lblEditSellProductIDProduct)
                    .addComponent(lblEditSellProductIDCustomer))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txfEditSellProductIDProduct, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txfEditSellProductIDCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(btnEditSellProductOK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txfEditSellProductIDStaff, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 105, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblListTotal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(lblListTotal1)
                        .addGap(45, 45, 45))))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(lblEditSellProductIDStaff)
                                    .addComponent(txfEditSellProductIDStaff, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(txfEditSellProductIDCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblEditSellProductIDCustomer))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(txfEditSellProductIDProduct, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblEditSellProductIDProduct)))
                            .addComponent(btnEditSellProductOK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(lblListTotal1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblListTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(146, 146, 146))
        );

        add(jPanel2, java.awt.BorderLayout.LINE_START);
    }// </editor-fold>//GEN-END:initComponents

    private void txfEditSellProductIDStaffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfEditSellProductIDStaffActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txfEditSellProductIDStaffActionPerformed

    private void txfEditSellProductIDCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfEditSellProductIDCustomerActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txfEditSellProductIDCustomerActionPerformed

    private void txfEditSellProductIDProductActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfEditSellProductIDProductActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txfEditSellProductIDProductActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnEditSellProductOK;
    private javax.swing.JButton btnSellProductSave;
    private javax.swing.JButton jButton3;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblEditSellProduct;
    private javax.swing.JLabel lblEditSellProductIDCustomer;
    private javax.swing.JLabel lblEditSellProductIDProduct;
    private javax.swing.JLabel lblEditSellProductIDStaff;
    private javax.swing.JLabel lblListTotal;
    private javax.swing.JLabel lblListTotal1;
    private javax.swing.JPanel pnlEditSellProduct;
    private javax.swing.JTable tblEditSellProduct;
    private javax.swing.JTextField txfEditSellProductIDCustomer;
    private javax.swing.JTextField txfEditSellProductIDProduct;
    private javax.swing.JTextField txfEditSellProductIDStaff;
    // End of variables declaration//GEN-END:variables

}
